package com.malty.shardingsphere.service;

import com.malty.shardingsphere.dao.AwEmployeeMapper;
import com.malty.shardingsphere.domain.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author malty
 */
@Service
public class EmployeeService {
    @Autowired
    private AwEmployeeMapper employeeMapper;


    public Boolean create(Employee employee) {
        int res = employeeMapper.createOne(employee);
        return res == 1;
    }

    public List<Employee> listAll() {
        return employeeMapper.listAll();
    }
}
